package cn.edu.sjtu.se.dslab.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.sjtu.se.dslab.component.Component;
import cn.edu.sjtu.se.dslab.dao.IComponentDao;
import cn.edu.sjtu.se.dslab.service.IComponentService;

@Service("componentService")
@Transactional
public class ComponentServiceImpl implements IComponentService {

	@Resource(name = "componentDao")
	private IComponentDao componentDao;

	@Override
	public Component getComponentById(long id) {
		// TODO Auto-generated method stub
		return componentDao.queryById(id);
	}

	@Override
	public Component getComponentByUri(String uri) {
		// TODO Auto-generated method stub
		return componentDao.queryByUri(uri);
	}

}
